﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ComputeLib
{
    class Calculation : ICalculation
    {
        private string name;
        private string description;
        private string formula;
        private string[] inputVars;
        private string[] dependentCaculations;

        public string Formula { get => formula; set => formula = value; }
        public string[] InputVars { get => inputVars; set => inputVars = value; }
        public string[] DependentCaculations { get => dependentCaculations; set => dependentCaculations = value; }
        public string Name { get => name; set => name = value; }
        public string Description { get => description; set => description = value; }

        public Calculation(string name, string description, string formula, string inputVars, string dependentCaculations)
        {
            Name = name;
            Description = description;
            Formula = formula;
            InputVars = inputVars.Split(new char[] { ',' });
            DependentCaculations = dependentCaculations.Split(new char[] { ',' });
        }

        public Calculation(string name, string description, string formula, string dependentVars)
        {
            Name = name;
            Description = description;
            Formula = formula;
            throw new Exception();
        }
    }
}
